// 系统日志模块类型定义

// 请求方法枚举
export enum RequestMethod {
  GET = 'GET',
  POST = 'POST',
  PUT = 'PUT',
  DELETE = 'DELETE',
  PATCH = 'PATCH',
  OPTIONS = 'OPTIONS',
  HEAD = 'HEAD'
}

// 系统日志
export interface SysLog {
  id: number;
  userId: number | null;
  username: string | null;
  operation: string;
  method: string;
  requestUrl: string;
  requestMethod: RequestMethod;
  requestParams: string;
  requestIp: string;
  responseCode: number | null;
  responseData: string;
  costTime: number;
  createdAt: string;
}

// 系统日志查询参数
export interface SysLogQueryParams {
  page?: number;
  size?: number;
  userId?: number;
  requestMethod?: string; // RequestMethod | 'all'
  operation?: string;
  errorOnly?: boolean;
}

// 系统日志列表响应
export interface SysLogListResponse {
  total: number;
  totalPages: number;
  pageNum: number;
  pageSize: number;
  logs: SysLog[];
} 